Advanced custom HTTP configuration
Users interact with Qlik Sense using authenticated communication through one or more proxies. Information is transferred using cookies. The cookies are necessary regardless of the authentication type used. Headers, cookies, and URL parameters are set through dictionaries.
Headers
When you need to add headers, use the CustomUserHeaders dictionary.
Example:
ILocation location = Qlik.Engine.Location.FromUri(new Uri("https://myserver.domain.com")); location.CustomUserHeaders.Add("X-Qlik-User", "DOMAIN\\Bob"); location.AsNtlmUserViaProxy();
This will result in the following header in the request:
X-Qlik-User : DOMAIN\Bob
Cookies
When you need to add cookies, use the CustomUserCookies dictionary.
Example:
ILocation location = Qlik.Engine.Location.FromUri(new Uri("https://myserver.domain.com")); location.CustomUserCookies.Add("SessionId", "98axxxxxxx12z"); location.CustomUserCookies.Add("SubUser", "Bob"); location.AsNtlmUserViaProxy();
This will result in the following URL in the request:
Cookie : SessionId=98axxxxxxx12z;SubUser=Bob
URL parameter
When you need to add parameters to the URL, use the CustomUserUrlParameters dictionary.
Example:
ILocation location = Qlik.Engine.Location.FromUri(new Uri("https://myserver.domain.com")); location.CustomUserUrlParameters.Add("Debug", "True"); location.CustomUserUrlParameters.Add("LogLevel", "2"); location.AsNtlmUserViaProxy();
This will result in the following URL in the request:
https://myserver.domain.com/app/?Debug=True&LogLevel=2